package app

import (
	"github.com/gin-gonic/gin"
	"mail/app/controller"
)

func RegisterRouters(app *gin.Engine) {
	user := controller.User{}
	admin := controller.Admin{}
	app.POST("/login", user.LoginHandler)
	app.POST("/register", user.RegisterHandler)
	app.POST("/userinfo", user.GetUserInfoHandler)
	app.POST("/sendbox", user.GetUserSendBoxHandler)
	app.POST("/recyclebox", user.GetUserRecycleBoxHandler)
	app.POST("/delsentmail", user.DelUserSendMailHandler)
	app.POST("/recovermail", user.RecoverMailHandler)
	app.POST("/emptymail", user.EmptyRecycleBoxHandler)
	app.POST("/changeinfo", user.ChangeInfoHandler)
	app.POST("/changepwd", user.ChangePwdHandler)

	app.POST("/userlist", admin.GetUserListHandler)
	app.POST("/serverstatus", admin.GetServerStatusHandler)
	app.POST("/forbid", admin.ForbiddenHandler)
	app.POST("/resetpwd", admin.ResetUserPwdHandler)
	app.POST("/forbidservice", admin.ForbiddenServiceHandler)
	app.POST("/forbidserver", admin.ForbiddenServerHandler)
	app.POST("/forbidIP", admin.ForbiddenIPHandler)
}
